package com.bojiu.lawsearch.lawsearch.mapper;

import com.bojiu.lawsearch.lawsearch.model.Rule;
import com.bojiu.lawsearch.lawsearch.model.SearchFactor;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author: afdiao
 * @Date：2020/3/6 23:11
 * @Description:
 */
@Repository
@Mapper
public interface RuleMapper extends ObjMapper<Rule> {
    int getMaxId();

    List<Rule> getRuleList(@Param("name") String name);

    List<Rule> getRuleBySearchFactor(SearchFactor searchFactor);

    List<Rule> getFinalSearch(@Param("aid") String aid, @Param("cid") String bid,@Param("titleIds") String titleIds);

    List<Integer> getRuleIdByBody(@Param("body") String body);

    List<Integer> getRuleIdByBodyAndUnit(@Param("rule") String rule,@Param("unit") String unit);

    List<Integer> getRuleIdBy2SetIds(@Param("aid") String aid, @Param("bid") String bid);
}
